﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common.Protocol
{
    public class ControlReq : Command
    {
        public enum OperationType
        {
            Left,
            Right,
            MouseMove,
            ZoomIn,
            ZoomOut,
            Location
        };

        public enum ProcessType
        {
            WaitForResponse,
            NoResoponse
        }

        public string Process
        {
            get;
            set;
        }

        public string Operation
        {
            get;
            set;
        }

        public double OffsetX
        {
            get;
            set;
        }

        public double OffsetY
        {
            get;
            set;
        }
        public CheckResp toResp()
        {
            CheckResp result = new CheckResp
            {
                SeqNO = this.SeqNO,
                Uid = this.Uid,
                SessionId = this.SessionId,
                OffsetX = this.OffsetX,
                OffsetY = this.OffsetY,
                Operation = this.Operation,
                Process = this.Process

            };
            return result;
        }
        public OperationType GetOperationType()
        {
            return (OperationType)Enum.Parse(typeof(OperationType), Operation);
        }

        public ProcessType GetProcessType()
        {
            return (ProcessType)Enum.Parse(typeof(ProcessType), Process);
        }
    }
}
